package com.atguigu.guli.service.cms.feign;

import com.atguigu.guli.common.base.result.R;
import com.atguigu.guli.service.cms.feign.fallback.OssFileServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zero
 * @desc 远程Feign调用接口
 * @create 2020/5/27
 */
@Service
@FeignClient(value = "service-oss", fallback = OssFileServiceFallBack.class)
public interface OssFileService {

    /**
     * 根据url删除Oss存储图片
     * @param url 文件url
     * @return 删除结果
     */
    @DeleteMapping("/admin/oss/file/remove")
    R removeFile(@RequestBody String url);

}
